﻿Imports mikrotik.MikrotikAPI

Public Class frmIPHotspotActiveUser
    Private mk As New mikrotik.MikrotikAPI("192.168.8.2")

    Private Sub Form1_Load(sender As Object, e As System.EventArgs) Handles Me.Load
        If Not mk.Login("ardhagp", "Kholifah8786") Then
            MsgBox("Tidak dapat Login")
        End If
    End Sub

    Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
        ds_IPHotspot.Tables("mk_user_profiles").Clear()
        mk.Send(TextBox1.Text, True)

        If mk.IsContainError = True Then
            MessageBox.Show("Terjadi kesalahan :" & vbCrLf & mk.ErrorMessage, Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error)
            Exit Sub
        Else
            cls_iphotspot.Show_User_Profiles(mk.Read, dg_user_profiles, ds_IPHotspot, "mk_user_profiles")
        End If


    End Sub
End Class
